package com.itao.jdbc;

import com.itao.jdbc.util.DbUtil;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

/**
 * @author sjt
 * @Date 2025/1/7 10:27
 */
public class Main {

    public static void main(String[] args) throws Exception {
        Connection connect = DbUtil.getConnect();
        String sql = "SELECT id FROM resource_info WHERE CAST(attributes AS JSON) ->>'1866691185738768388' LIKE '%开发测试%'";
        Statement statement = connect.createStatement();

        ResultSet resultSet = statement.executeQuery(sql);
        while (resultSet.next()) {
            System.out.println("id: " + resultSet.getString("id"));
        }
    }
}
